package com.eps.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Renato
 */
@Entity
@Table(name = "codigos_inversion")
@NamedQueries({
    @NamedQuery(name = "CodigosInversion.findAll", query = "SELECT c FROM CodigosInversion c"),
    @NamedQuery(name = "CodigosInversion.findByIdCodInversion", query = "SELECT c FROM CodigosInversion c WHERE c.idCodInversion = :idCodInversion"),
    @NamedQuery(name = "CodigosInversion.findByDescripcion", query = "SELECT c FROM CodigosInversion c WHERE c.descripcion = :descripcion")})
public class CodigosInversion implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "id_cod_inversion")
    private String idCodInversion;
    @Column(name = "descripcion")
    private String descripcion;

    public CodigosInversion() {
    }

    public CodigosInversion(String idCodInversion) {
        this.idCodInversion = idCodInversion;
    }

    public String getIdCodInversion() {
        return idCodInversion;
    }

    public void setIdCodInversion(String idCodInversion) {
        this.idCodInversion = idCodInversion;
    }

    public String getDescripcion() {
        return descripcion;
    }

    public void setDescripcion(String descripcion) {
        this.descripcion = descripcion;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idCodInversion != null ? idCodInversion.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {

        if (!(object instanceof CodigosInversion)) {
            return false;
        }
        CodigosInversion other = (CodigosInversion) object;
        if ((this.idCodInversion == null && other.idCodInversion != null) || (this.idCodInversion != null && !this.idCodInversion.equals(other.idCodInversion))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "suministros.ejb30.entity.CodigosInversion[idCodInversion=" + idCodInversion + "]";
    }

}
